package old.apiday03;

import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.Callable;

public class CollectionDemo2 {
    public static void main(String[] args) {
        Collection c1=new ArrayList();
        c1.add("java");
        c1.add("c++");
        c1.add(".net");
        System.out.println(c1);
        Collection c2=new ArrayList();
        c2.add("android");
        c2.add("ios");
        c2.add("java");
        System.out.println(c2);
        c1.removeAll(c2);//删除共有的元素
        System.out.println(c1);
        /*
        c1.retainAll(c2);//只保留共有的
        System.out.println(c1);

         */

    }
}
